Optimal. Leaf size=103 \[ \frac {4 a^2 (i A+B) \sqrt {c-i c \tan (e+f x)}}{f}-\frac {2 a^2 (i A+3 B) (c-i c \tan (e+f x))^{3/2}}{3 c f}+\frac {2 a^2 B (c-i c \tan (e+f x))^{5/2}}{5 c^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.047, Rules used = {3669, 78}
\begin {gather*} -\frac {2 a^2 (3 B+i A) (c-i c \tan (e+f x))^{3/2}}{3 c f}+\frac {4 a^2 (B+i A) \sqrt {c-i c \tan (e+f x)}}{f}+\frac {2 a^2 B (c-i c \tan (e+f x))^{5/2}}{5 c^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 3669
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) \sqrt {c-i c \tan (e+f x)} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(a+i a x) (A+B x)}{\sqrt {c-i c x}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {2 a (A-i B)}{\sqrt {c-i c x}}-\frac {a (A-3 i B) \sqrt {c-i c x}}{c}-\frac {i a B (c-i c x)^{3/2}}{c^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {4 a^2 (i A+B) \sqrt {c-i c \tan (e+f x)}}{f}-\frac {2 a^2 (i A+3 B) (c-i c \tan (e+f x))^{3/2}}{3 c f}+\frac {2 a^2 B (c-i c \tan (e+f x))^{5/2}}{5 c^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.31, size = 83, normalized size = 0.81 \begin {gather*} \frac {a^2 \sec ^2(e+f x) (5 (5 i A+3 B)+(25 i A+21 B) \cos (2 (e+f x))+(-5 A+9 i B) \sin (2 (e+f x))) \sqrt {c-i c \tan (e+f x)}}{15 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.44, size = 83, normalized size = 0.81
method | result | size |
derivativedivides | \(-\frac {2 i a^{2} \left (\frac {i B \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {\left (-3 i B c +A c \right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 \left (-i B c +A c \right ) c \sqrt {c -i c \tan \left (f x +e \right )}\right )}{f \,c^{2}}\) | \(83\) |
default | \(-\frac {2 i a^{2} \left (\frac {i B \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {\left (-3 i B c +A c \right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 \left (-i B c +A c \right ) c \sqrt {c -i c \tan \left (f x +e \right )}\right )}{f \,c^{2}}\) | \(83\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 81, normalized size = 0.79 \begin {gather*} -\frac {2 i \, {\left (3 i \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {5}{2}} B a^{2} + 5 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} {\left (A - 3 i \, B\right )} a^{2} c - 30 \, \sqrt {-i \, c \tan \left (f x + e\right ) + c} {\left (A - i \, B\right )} a^{2} c^{2}\right )}}{15 \, c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 7.07, size = 109, normalized size = 1.06 \begin {gather*} -\frac {4 \, \sqrt {2} {\left (15 \, {\left (-i \, A - B\right )} a^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, {\left (-5 i \, A - 3 \, B\right )} a^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 2 \, {\left (-5 i \, A - 3 \, B\right )} a^{2}\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{15 \, {\left (f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} \left (\int \left (- A \sqrt {- i c \tan {\left (e + f x \right )} + c}\right )\, dx + \int A \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{2}{\left (e + f x \right )}\, dx + \int \left (- B \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan {\left (e + f x \right )}\right )\, dx + \int B \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{3}{\left (e + f x \right )}\, dx + \int \left (- 2 i A \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan {\left (e + f x \right )}\right )\, dx + \int \left (- 2 i B \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{2}{\left (e + f x \right )}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.99, size = 241, normalized size = 2.34 \begin {gather*} \frac {2\,a^2\,\sqrt {\frac {c\,\left (\cos \left (2\,e+2\,f\,x\right )+1-\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}\right )}{\cos \left (2\,e+2\,f\,x\right )+1}}\,\left (A\,250{}\mathrm {i}+174\,B+A\,\cos \left (2\,e+2\,f\,x\right )\,375{}\mathrm {i}+A\,\cos \left (4\,e+4\,f\,x\right )\,150{}\mathrm {i}+A\,\cos \left (6\,e+6\,f\,x\right )\,25{}\mathrm {i}+267\,B\,\cos \left (2\,e+2\,f\,x\right )+114\,B\,\cos \left (4\,e+4\,f\,x\right )+21\,B\,\cos \left (6\,e+6\,f\,x\right )-25\,A\,\sin \left (2\,e+2\,f\,x\right )-20\,A\,\sin \left (4\,e+4\,f\,x\right )-5\,A\,\sin \left (6\,e+6\,f\,x\right )+B\,\sin \left (2\,e+2\,f\,x\right )\,45{}\mathrm {i}+B\,\sin \left (4\,e+4\,f\,x\right )\,36{}\mathrm {i}+B\,\sin \left (6\,e+6\,f\,x\right )\,9{}\mathrm {i}\right )}{15\,f\,\left (15\,\cos \left (2\,e+2\,f\,x\right )+6\,\cos \left (4\,e+4\,f\,x\right )+\cos \left (6\,e+6\,f\,x\right )+10\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________